Share via


GlobalizationSection Class [IIS 7 and higher]

Configures the globalization settings for a Web application.

Syntax

class GlobalizationSection : ConfigurationSection

Methods

The following table lists the methods exposed by the GlobalizationSection class.

Name

Description

GetAllowDefinition

(Inherited from ConfigurationSection.)

GetAllowLocation

(Inherited from ConfigurationSection.)

RevertToParent

(Inherited from ConfigurationSection.)

SetAllowDefinition

(Inherited from ConfigurationSection.)

SetAllowLocation

(Inherited from ConfigurationSection.)

Properties

The following table lists the properties exposed by the GlobalizationSection class.

Name

Description

Culture

An optional read/write string value that specifies the default culture for processing incoming Web requests. For valid culture strings, see the System.Globalization.CultureInfo class. You can also set this property to "auto".

NoteNote:
This property is new in the .NET Framework 2.0.

EnableBestFitResponseEncoding

An optional read/write boolean value. true if the best-fit character encoding for a response is enabled; otherwise, false. The default is false.

NoteNote:
This property is new in the .NET Framework 2.0.

EnableClientBasedCulture

An optional read/write boolean value. true if the Culture and UICulture properties should be based on the AcceptLanguage header field value that is sent by the client browser; otherwise, false. The default is false.

The AcceptLanguage header specifies the language that a given browser prefers.

NoteNote:
This property is new in the .NET Framework 2.0.

FileEncoding

An optional read/write string value that specifies the default encoding for .aspx, .asmx, and .asax file parsing. Unicode and UTF-8 files that are saved with the byte order mark prefix are automatically recognized, regardless of the value of this property.

NoteNote:
This property is new in the .NET Framework 2.0.

Location

(Inherited from ConfigurationSection.) A key property.

Path

(Inherited from ConfigurationSection.) A key property.

RequestEncoding

An optional read/write string value that specifies the assumed encoding of each incoming request, including posted data and the query string. The default is "UTF-8".

If the request includes a request header that contains an Accept-Charset attribute, it overrides this property value in the configuration.

NoteNote:
The default encoding is specified in the globalization section of the Machine.config file that was created when the .NET Framework was installed. If response encoding is not specified in a Machine.config or Web.config file, encoding is set to the default Regional Options locale for the computer. This property is new in the .NET Framework 2.0.

ResourceProviderFactoryType

An optional read/write string value that specifies the factory type of the resource provider.

ResponseEncoding

An optional read/write string value that specifies the content encoding of responses. The default is "UTF-8".

NoteNote:
The default encoding is specified in the globalization section of the Machine.config file that was created when the .NET Framework was installed. If response encoding is not specified in a Machine.config or Web.config file, encoding is set to the default Regional Options locale for the computer. This property is new in the .NET Framework 2.0.

ResponseHeaderEncoding

An optional read/write string value that specifies the header encoding of HTTP responses. The default is "UTF-8".

NoteNote:
This property is new in the .NET Framework 2.0.

SectionInformation

(Inherited from ConfigurationSection.)

UICulture

An optional read/write string value that specifies the default culture for processing locale-dependent resource searches. For valid culture strings, see the System.Globalization.CultureInfo class. You can also set this property to "auto".

NoteNote:
This property is new in the .NET Framework 2.0.

Subclasses

This class contains no subclasses.

Inheritance Hierarchy

ConfigurationSection

   GlobalizationSection

Requirements

Type

Description

Client

Requires IIS 7 on Windows Vista.

Server

Requires IIS 7 on Windows Server 2008.

Product

IIS 7

MOF file

WebAdministration.mof

See Also

Reference

ConfigurationSection Class [IIS 7 and higher]

Other Resources

System.Globalization.CultureInfo Class

globalization Element (ASP.NET Settings Schema)

System.Web.Configuration.GlobalizationSection Properties